kind: BashibleTemplateData
apiVersions:
- apiVersion: deckhouse.io/v1
  openAPISpec:
    type: object
    additionalProperties: false
    required: [apiVersion, kind, bundle, kubernetesVersion, cri, runType, k8s]
    properties:
      apiVersion:
        type: string
        enum: [deckhouse.io/v1, deckhouse.io/v1alpha1]
      kind:
        type: string
        enum: [BashibleTemplateData]
      provider:
        type: string
      bundle:
        type: string
        enum: [ubuntu-lts, centos, debian]
      kubernetesVersion:
        type: string
      cri:
        type: string
        enum: [Docker, Containerd, NotManaged]
      proxy:
        type: object
        properties:
          httpProxy:
            type: string
          httpsProxy:
            type: string
          noProxy:
            type: array
            items:
              type: string
      runType:
        type: string
        enum: [ClusterBootstrap, ImageBuilding, Normal]
      registry:
        type: object
        properties:
          host:
            type: string
          auth:
            type: string
          address:
            type: string
          path:
            type: string
          scheme:
            type: string
          ca:
            type: string
          dockerCfg:
            type: string
      images:
        type: object
      clusterBootstrap:
        type: object
        properties:
          clusterDNSAddress:
            type: string
          clusterDomain:
            type: string
          cloud:
            type: object
            properties:
              nodeIP:
                type: string
      nodeGroup:
        type: object
        required: [cloudInstances, instanceClass]
        instanceClass:
          type: object
        cloudInstances:
          type: object
      bashible: &bashible
        type: object
        patternProperties:
          "ubuntu-lts|centos|debian":
            type: object
            patternProperties:
              '^[0-9.]+$':
                type: object
                properties:
                  docker:
                    type: object
                    properties:
                      desiredVersion:
                        type: string
                      allowedPattern:
                        type: string
                      containerd:
                        type: object
                        properties:
                          desiredVersion:
                            type: string
                          allowedPattern:
                            type: string
                  containerd:
                    type: object
                    properties:
                      desiredVersion:
                        type: string
                      allowedPattern:
                        type: string
      k8s:
        type: object
        patternProperties:
          '^1.[0-9]+$':
            type: object
            properties:
              patch:
                type: [string, number]
              cniVersion:
                type: string
              bashible: *bashible
              ccm:
                type: object
                properties:
                  openstack:
                    type: string
                  yandex:
                    type: string
                  aws:
                    type: string
                  vsphere:
                    type: string
                  azure:
                    type: string
                  gcp:
                    type: string
              csi:
                type: object
                properties:
                  openstack:
                    type: string
                  provisioner:
                    type: string
                  attacher:
                    type: string
                  resizer:
                    type: string
                  registrar:
                    type: string
              controlPlane:
                type: object
                properties:
                  etcd:
                    type: string
                  kubeApiServer:
                    type: string
                  kubeControllerManager:
                    type: string
                  kubeScheduler:
                    type: string
                  kubeProxy:
                    type: string
    oneOf:
    - required: [clusterBootstrap]
      properties:
        runType:
          enum: [ClusterBootstrap]
          type: string
    - properties:
        runType:
          enum: [ImageBuilding, Normal]
          type: string
